#!/bin/bash
echo Start make -- this is just for test 20200629
make -j$(nproc)

if [ $? -eq 0 ];then
	echo ----------------------------------------------------------------
	echo Build success
	echo Ready to download by JLink...	
	echo ----------------------------------------------------------------
	st-flash --reset write build/*.bin 0x8000000
	# . jlink/jlink_cmd.sh build/*.hex
else
	echo Build failed
fi

